FROM nginx:1.17.1 AS final

USER root
ENV TZ=Asia/Shanghai
WORKDIR /usr/src/app

COPY ./dist/ /usr/share/nginx/dist
COPY ./nginx.conf /etc/nginx/conf.d/default.conf
RUN mkdir logs

EXPOSE 80

# If you add a custom CMD in the Dockerfile, be sure to include -g daemon off; in the CMD in order for nginx to stay in the foreground, so that Docker can track the process properly (otherwise your container will stop immediately after starting)!
CMD ["nginx", "-g", "daemon off;"]
